fix clippy warnings in glean/api/src/ffi/event.rs
Categories
(Developer Infrastructure :: Lint and Formatting, task)
Tracking
(firefox126 fixed)
Tracking | Status | |
---|---|---|
firefox126 | --- | fixed |
People
(Reporter: Sylvestre, Assigned: tannal2409, Mentored)
References
(Blocks 1 open bug)
Details
(Keywords: good-first-bug, Whiteboard: [lang=rust])
Attachments
(2 files, 2 obsolete files)
Filling as a good first bug to learn workflows.
toolkit/components/glean/api/src/ffi/event.rs:
61:10 warning unneeded `return` statement clippy::needless_r
eturn (clippy)
151:21 warning use of `.unwrap_or_else(..)` to construct default value clippy::unwrap_or_
else_default (clippy)
Links to the code:
https://searchfox.org/mozilla-central/rev/78a2c17cc80680a5a82446e4ce7c45a73b935383/toolkit/components/glean/api/src/ffi/event.rs#62
https://searchfox.org/mozilla-central/rev/78a2c17cc80680a5a82446e4ce7c45a73b935383/toolkit/components/glean/api/src/ffi/event.rs#151
To run clippy:
./mach lint -l clippy toolkit/components/glean/api/src/ -W -v
As the change is trivial, it is just to learn how to contribute to Firefox.
Tutorial to contribute:
https://firefox-source-docs.mozilla.org/contributing/contribution_quickref.html
https://firefox-source-docs.mozilla.org/contributing/stack_quickref.html
Please don't ask for the bug to be assigned. It will be automatically assigned to the first patch.
Updated•1 year ago
|
Reporter | ||
Comment 2•1 year ago
•
|
||
ignore my message :)
Comment 4•1 year ago
|
||
Backed out for causing build bustages with unwrap_or_else_default
- Backout link
- Push with failures
- Failure Log
- Failure line: error[E0599]: no method named
unwrap_or_else_default
found for enumstd::option::Option
in the current scope
i have quick question, how do I know the dependent rust version from source code?
The version I found from the file Cargo.toml(path: toolkit/components/glean/api/Cargo.toml) is edition = "2018"
,
but from the Failure Log , i can see that it is edition = "2021"
.
log:
[task 2024-01-13T10:50:23.737Z] 10:50:23 INFO - checking rustc version... 1.75.0
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Comment 8•1 year ago
|
||
There is an r+ patch which didn't land and no activity in this bug for 2 weeks.
:asthetiklee, could you have a look please?
If you still have some work to do, you can add an action "Plan Changes" in Phabricator.
For more information, please visit BugBot documentation.
Updated•1 year ago
|
Reporter | ||
Comment 10•1 year ago
|
||
Contributor inactive, unassigning it
Assignee | ||
Comment 11•1 year ago
|
||
Updated•1 year ago
|
Comment 12•1 year ago
|
||
Comment 13•1 year ago
|
||
bugherder |
Description
•